package com.share.cloudStorage.shares.service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.share.cloudStorage.shares.dao.SharesDao;
import com.share.cloudStorage.shares.model.Shares;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SharesServiceImpl extends ServiceImpl<SharesDao, Shares> implements SharesService {

    @Autowired
    private SharesDao sharesDao;

    @Override
    public Shares getShareInfo(String link) {
        return sharesDao.selectShareInfoByLink(link);
    }

    @Override
    public List<Shares> searchAllByUserId(Integer userId) {
        return sharesDao.selectAllByUserId(userId);
    }
}

